if exists(select name from sysobjects where name = 'sp_LoaiSanPhamUpdate')
	drop proc sp_LoaiSanPhamUpdate
go
/*
	Created by: Phuoc NH
	Created on: 19/01/2013 (dd/mm/yyyy)
	Description: update loai san pham
	--
	File:$sql-scripts/Proc.sp_LoaiSanPhamUpdate.sql
*/

create proc sp_LoaiSanPhamUpdate
@Ten_loai_san_pham Nvarchar(500),
@Hien_danh_muc bit,
@Hien_trang_chu bit,
@Vi_tri tinyint,
@Loai_san_pham_id int,
@Loai_san_pham_cha_id int
as
begin
	update tbl_Loai_san_pham set Ten_loai_san_pham=@Ten_loai_san_pham, Hien_danh_muc=@Hien_danh_muc, Hien_trang_chu=@Hien_trang_chu, Loai_san_pham_cha_id=@Loai_san_pham_cha_id, Vi_tri=@Vi_tri where Loai_san_pham_id=@Loai_san_pham_id
end
go